package com.xzx.annotation.applicationlistener;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * @author xinzhixuan
 * @version 1.0
 * @date 2025/5/10 17:38
 */
public class ApplicationListenerMain {
    public static void main(String[] args) {
        AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(ApplicationListenerConfig.class);
        context.publishEvent("我自己的事件");
        context.publishEvent(new MyApplicationEvent("事件2"));
        context.close();

    }
}
